<html><head><title>api.system.EventDispatcher</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><link rel="stylesheet" type="text/css" href="../../styles/prettify.css"><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/main.js"></script></head><body class="FramedContentPage" onLoad="{NDOnLoad();prettyPrint();}"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.4 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="api.system.EventDispatcher"></a>api.<wbr>system.<wbr>EventDispatcher</h1><div class=CBody><h4 class=CHeading>usage</h4><blockquote><pre class="prettyprint">var obj = {
    myfunc : function(event) {
        alert(&quot;type: &quot;+event.getType()+&quot; source:&quot;+event.getSource()+&quot; data:&quot;+event.getData());
    }
}

ve.addListener(&quot;mousedown&quot;, myfunc, obj);

var event = new api.system.Event();
event.setType(&quot;mousedown&quot;);
event.setData({x : ve.getX(), y : ve.getY()});
ve.dispatch(event);</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#api.system.EventDispatcher" >api.<wbr>system.<wbr>EventDispatcher</a></td><td class=SDescription></td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#api.system.EventDispatcher.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#api.system.EventDispatcher.EventDispatcher" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">EventDispatcher</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#api.system.EventDispatcher.dispatch" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">dispatch</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#api.system.EventDispatcher.addListener" >addListener</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#api.system.EventDispatcher.removeListener" >removeListener</a></td><td class=SDescription></td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="api.system.EventDispatcher.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.EventDispatcher.EventDispatcher"></a>EventDispatcher</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>EventDispatcher : function()</td></tr></table></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.EventDispatcher.dispatch"></a>dispatch</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>dispatchEvent : function(</td><td class=PParameter nowrap>event</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.EventDispatcher.addListener"></a>addListener</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="api.system.EventDispatcher.removeListener"></a>removeListener</h3></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>EventDispatcher : function()</td></tr></table></blockquote></div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>dispatchEvent : function(</td><td class=PParameter nowrap>event</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote></div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>